//
// Created by Max on 2024/5/9.
//

#ifndef DBX_SOUND_LOCATION_PROPERTIES_H
#define DBX_SOUND_LOCATION_PROPERTIES_H
#include <sys/cdefs.h>
#include <stddef.h>
#include <sys/system_properties.h>
#include <stdint.h>
#include "iostream"

#define PROPERTY_KEY_MAX   PROP_NAME_MAX
#define PROPERTY_VALUE_MAX  PROP_VALUE_MAX

class Properties {
public:
    Properties();
    ~Properties();

public:
    int property_get(const char* key, char* value, const char* default_value);
    int property_set(const char *key, const char *value);

    int32_t getPropertyInt(const char *key, int32_t def);

    int32_t getTvMicNum();
    static Properties *instance();

    static Properties *m_pProperties;
    static std::mutex m_mutex;
};
#endif //DBX_SOUND_LOCATION_PROPERTIES_H
